home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / freeres / rst2frm1.pas < prev    next >
Pascal/Delphi Source File  |  1995-12-22  |  842b  |  47 lines

  1. unit Rst2frm1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Panel1: TPanel;
  12.     Button1: TButton;
  13.     procedure Button1Click(Sender: TObject);
  14.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28. uses rst2frm2, FreeRes;
  29.  
  30. procedure TForm1.Button1Click(Sender: TObject);
  31. begin
  32.   Form2.Height := Height;
  33.   Form2.Width := Width;
  34.   Form2.Left := Left;
  35.   Form2.Top := Top;
  36.   Form2.Show;
  37.   Hide;
  38.   FreeWinControl(self);
  39. end;
  40.  
  41. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  42. begin
  43.   Application.Terminate;
  44. end;
  45.  
  46. end.
  47.